#include<iostream>
#include<vector>
#include<queue>
#include<cstring>
#include<cmath>
#include<map>
#include<set>
#include<unordered_map>
#include<cstdio>
#include<algorithm>
#define debug(a) cout<<#a<<"="<<a<<endl;
using namespace std;
const int maxn=2e5+1000;
typedef long long LL;
typedef pair < int,int > P;
inline LL read(){LL x=0,f=1;char ch=getchar();	while (!isdigit(ch)){if (ch=='-') f=-1;ch=getchar();}while (isdigit(ch)){x=x*10+ch-48;ch=getchar();}
return x*f;}
map<P,int>map1;
inline bool check(LL x1,LL y1,LL r1,LL x2,LL y2,LL r2)
{

    if( (r1-r2)*(r1-r2) <= (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2) ) return true;
    else return false;
}
inline LL dis(LL x1,LL y1,LL x2,LL y2){
    return (x1-x2)*(x1-x2)+(y1-y2)*(y1-y2);
}
int circleGame(vector<vector<int>>& t, vector<vector<int>>& c, int r) {

    int ans=0;
    for(int i=0;i<c.size();i++)
    {
        map1[{c[i][0],c[i][1]}]=true;
    }
    for(int i=0;i<t.size();i++)
    {
        int x=t[i][0];int y=t[i][1];int rr=t[i][2];

        for(int nx=x-rr;nx<=x+rr;nx++)
        {
            for(int ny=y-rr;ny<=y+rr;ny++)
            {
                if(dis(nx,ny,x,y)>rr*rr) continue;
                if(!map1.count({nx,ny})) continue;
                cout<<"nx="<<nx<<" "<<"ny="<<ny<<" "<<"x="<<x<<" "<<"y="<<y<<endl;

                if(check(nx,ny,r,x,y,rr)==true){
                    ans++;
                    goto TH;
                }
            }
        }
        TH:
            continue;
    }
    return ans;
}
int main(void){
    vector<int>v1,v2;
    v1.push_back(1);v1.push_back(3);v1.push_back(2);
    v2.push_back(4);v2.push_back(3);v1.push_back(1);
    vector<vector<int>>m;
    m.push_back(v1);m.push_back(v2);
    vector<int>v3;vector<int>v4;
    v3.push_back(1);v3.push_back(0);
    v4.push_back(3);v4.push_back(3);
    vector<vector<int>>c;
    c.push_back(v3);c.push_back(v4);
    int r=4;
    cout<<circleGame(m,c,r)<<endl;
   	return 0;
}
